<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>客户信息</title>
		<meta content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0" name="viewport" />
		<meta content="yes" name="apple-mobile-web-app-capable" />
		<meta content="black" name="apple-mobile-web-app-status-bar-style" />
		<meta content="telephone=no" name="format-detection" />
		<!-- 引入YDUI样式 -->
		<link rel="stylesheet" href="../build/css/ydui.css" />
		<link rel="stylesheet" href="../css/common.css" />
		<link rel="stylesheet" href="../css/fontcss/css/font-awesome.min.css" />
		<style>
			label{
				display: inline-block;
				min-width: 1.5rem;
				text-align: right;
				color:#666666;
			}
			input{
				border:1px solid #eee;
				padding: .1rem .3rem;
				color:#666666;
				font-family: -webkit-pictograph;
				}
			.basicinfo{padding: .2rem;}
			.basicinfo div{
				padding: .35rem .2rem;
				display: flex;
				align-items: center;
			}
			.truemodify{
				background: #C1060F;
				border: none;
				color: #ffffff;
				padding: .2rem 1rem;
				border-radius: .2rem;
				margin-top: .2rem;
			}
			
		</style>
	</head>
	<body>
		<div class="logincantion">
			<header class="m-navbar">
				<a href="#" onClick="javascript :window.history.back(); return false;" class="navbar-item">
					<i class="back-ico"></i>
				</a>
				<div class="navbar-center">
					<span class="navbar-title">客户信息</span>
				</div>
			</header>
			<div class="basicinfo">
				<div>
					<label>客户姓名：</label>
					<input type="text" readonly="readonly"  value="" name="customerName" />
				</div>
				<div>
					<label>报备楼盘：</label>
					<input type="text" readonly="readonly" value="" name="housename" />
				</div>
				<div>
					<label>楼盘地址：</label>
					<input type="text" readonly="readonly" value="" name="houseaddress" />
				</div>
				<div>
					<label>客户电话：</label>
					<input type="number" pattern="[0-9]*" readonly="readonly"  value="" name="customerTel" autocomplete="off" />
				</div>
				<div>
					<label>客户性别：</label>
					<input type="text" readonly="readonly"  value="" name="Sex" />
				</div>
				<div>
					<label>带看时间：</label>
					<input type="text" readonly="readonly" value="" name="Time" />					
				</div>
				<div>
					<label>购房意向：</label>
					<textarea style="color:#666666;padding:.2rem;font-family:-webkit-pictograph;" name="Content" readonly="readonly" rows="10" cols="28"></textarea>				</div>				
				<!-- 报备客户按钮 -->
				<!-- <a href="./release.html">
					<div id="release">发布</div>
				</a> -->
				<!-- 报备客户按钮 -->
				<!-- <a href="./reportecustomers/index.html">
					<div id="preparation">报备</div>
				</a> -->
				<!-- 回到首页 -->
				<a href="../index.html">
					<div id="preparation"><i style="font-size: .4rem;" class='fa fa-home'></i></div>
				</a>
			</div>
		</div>
	</body>
	<!-- 引入YDUI自适应解决方案类库 -->
	<script src="../build/js/ydui.flexible.js"></script>
	<script src="../js/jq331.min.js"></script>
	<!-- 引入YDUI脚本 -->
	<script src="../build/js/ydui.js"></script>
	<script src="../js/common.js"></script>
	<script>
		$(document).ready(function(){
			var getcustomerinfoApi = commapi + 'order/content'
			var currentid = params.id;
			$.ajax({
					url : getcustomerinfoApi,
					type : "GET",
					data: {'id': currentid},
					beforeSend: function(request) {
					request.setRequestHeader("token", dataToken);
						},
					success : function(result) {
						console.log(result)
						$("input[name='customerName']").val(result.name);
						$("input[name='housename']").val(result.house_title);
						$("input[name='houseaddress']").val(result.house_address);
						$("input[name='customerTel']").val(result.number);
						var sex = result.gender;
						if(sex = '1'){
							sex = '男'
						}else{
							sex = '女'
						}
						$("input[name='Sex']").val(sex);
						$("input[name='Time']").val(result.date);
						$("textarea[name='Content']").val(result.content);
					},
					error:function(msg){
						console.log(msg) // 失败返回
					}
			});
		});
	</script>
</html>
